﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Design;
using System.Drawing.Design;

namespace OfficeClip.OpenSource.SpellO
{
	public class SettingsBL
	{
		[ReadOnlyAttribute(true), CategoryAttribute("Basic Settings")]
		public string Id { get; set; }

		[CategoryAttribute("Basic Settings"), 
        DescriptionAttribute("The root url from where the crawling begins")]
		public string BaseUrl { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("The maximum depth (number of inner links) the crawler will follow")]
		public int MaxCrawlDepth { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("The number of simultaneous threads that the crawler will use")]
        public int ThreadCount { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("The priority of the crawler process. Valid values are 1 to 5")]
        public int WorkItemPriority { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("Whether the crawler will honor the robot.txt file")]
        public bool AdhereToRobotRules { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("The delay time to download each html file that crawler encounters. This can be set to avoid loading the website.")]
        public int DownloadDelay { get; set; }

        [CategoryAttribute("Crawler Settings"),
        DescriptionAttribute("The user agent name that will be registered on the log file of the website.")]
        public string UserAgent { get; set; }

        [CategoryAttribute("Crawler Settings"), Editor(typeof(MultilineStringEditor), typeof(UITypeEditor)),
        DescriptionAttribute("The urls that are allowed to crawl. Usually this is used in conjunction with the DisallowedUrls. Use regular expression (one per line).")]
        public string AllowedUrls { get; set; }

        [CategoryAttribute("Crawler Settings"), Editor(typeof(MultilineStringEditor), typeof(UITypeEditor)),
        DescriptionAttribute("The urls that are not allowed to crawl. Use regular expression (one per line).")]
        public string DisallowedUrls { get; set; }

        [CategoryAttribute("Crawler Settings"), Editor(typeof(MultilineStringEditor), typeof(UITypeEditor)),
        DescriptionAttribute("The tag pair (specified with a comma in between) that the crawler will ignore words while crawling. For example to ignore all text between body tags, use <body>,</body>.")]
        public string ProcessHtmlFilter { get; set; }

        [CategoryAttribute("Crawler Settings"), Editor(typeof(MultilineStringEditor), typeof(UITypeEditor)),
        DescriptionAttribute("The tag pair (specified with a comma in between) that the crawler will ignore inner links while crawling. For example to ignore all text between head tags, use <head>,</head>.")]
        public string ProcessLinkFilter { get; set; }

        [CategoryAttribute("SpellCheck Settings"),
        DescriptionAttribute("Whether the alternate spelling suggestions are shown by the spell checker.")]
        public bool ShowSuggestions { get; set; }

        [CategoryAttribute("SpellCheck Settings"),
        DescriptionAttribute("The minimum number of words that will be checked by the spell checker.")]
        public int MinimumWordLength { get; set; }

        [CategoryAttribute("SpellCheck Settings"),
        DescriptionAttribute("Whether all capital words (uppercase words) are to be ignored. Usually these are abbreviations.")]
        public bool IgnoreAllCapitals { get; set; }

        [CategoryAttribute("SpellCheck Settings"),
        DescriptionAttribute("The dictionary name that the spell checker will use. Currently supported values are de_DE, en_GB, en_US, es_ES, es_MX and fr_FR. More dictionaries can be downloaded from the open office website")]
        public string Dictionary { get; set; }

        [CategoryAttribute("SpellCheck Settings"), Editor(typeof(MultilineStringEditor), typeof(UITypeEditor)),
        DescriptionAttribute("The words that the spell checker will ignore. One word per line")]
        public string AllowWords { get; set; }
		
	}
}
